import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/Home.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "首页",
    component: HomeView,
  },
  {
    path: "/product",
    name: "产品服务",
    redirect: "/product/private-operations",
    children: [
      {
        path: "private-operations",
        name: "私域电商",
        component: () => import("../views/PrivateOperations.vue"),
      },
      {
        path: "tourism-commerce",
        name: "旅游电商",
        component: () => import("../views/TourismCommerce.vue"),
      },
      {
        path: "rural-revitalization",
        name: "乡村振兴",
        component: () => import("../views/RuralRevitalization.vue"),
      },
      {
        path: "ip-design",
        name: "ip设计",
        component: () => import("../views/IPDesign.vue"),
      },
      {
        path: "general-benefits",
        name: "通用福利",
        component: () => import("../views/GeneralBenefits.vue"),
      },
    ],
  },
  {
    path: "/cooperation",
    name: "合作共赢",
    component: () => import("../views/CooperationView.vue"),
  },
  {
    path: "/case",
    name: "客户案例",
    component: () => import("../views/CaseView.vue"),
  },
  {
    path: "/about",
    name: "关于我们",
    redirect: "/about/introduction",
    children: [
      {
        path: "introduction",
        name: "公司简介",
        component: () => import("../views/AboutView.vue"),
      },
      {
        path: "join",
        name: "加入我们",
        component: () => import("../views/AboutView.vue"),
      },
      {
        path: "contact",
        name: "联系我们",
        component: () => import("../views/AboutView.vue"),
      },
      {
        path: "news",
        name: "新闻中心",
        component: () => import("../views/NewsView.vue"),
      },
    ],
  },
];

const router = new VueRouter({
  routes,
});

export default router;
